if(window!=top)top.location.href=location.href;
$('#imgVerify').attr("src","/login/getVerify");
function getVerify(obj){
    obj.src = "/login/getVerify?"+Math.random();
}

var $;
var element;
layui.use(['jquery','element'],function () {
    $ = layui.$;
    element = layui.element;
});

function verification() {
    var code = $('input[name = code]').val();
    $.ajax({
        url:'/login/getVerification',
        data:{"verificationCode":code},
        type:'post',
        success:function (data) {
            console.log(data);
            data = data.data;
            if(data){
                $('#signin').click();
            }else{
                layer.msg("验证码错误");
                $('#imgVerify').click();
            }
        },error:function () {
            console.log("aa");
        }
    })
};
